#ifndef hal_configer_H
#define hal_configer_H

#include <stdint.h>
#include <cfg_param.h>

// 激光器的参数保存结构体
typedef struct
{
    float Current_Chn_1;
    float Current_Chn_2;
    float Temperature_Chn_1;
    float Temperature_Chn_2;
    float TempCtrCurrent_Chn_1;
    float TempCtrCurrent_Chn_2;
    float Current_PD;
} TempCurrentParaSt;

// 种子电流/TA工作电流/温度/功率判断阈值的模式选择
typedef enum
{
    JUDGE_LASER_LIMIT_TYPE_CURRENT_SEED = 1,
    JUDGE_LASER_LIMIT_TYPE_CURRENT_TA,
    JUDGE_LASER_LIMIT_TYPE_TEMP,
    JUDGE_LASER_LIMIT_TYPE_PD,
} LaserJudgeLimitTypeEn;

void LaserInit();

uint8_t hal_LaserReadValueNormal(LaserJudgeLimitTypeEn LaserJudgeLimitType, float data, int laser_num);
uint8_t hal_LaserWriteValueNormal(LaserJudgeLimitTypeEn LaserJudgeLimitType, float data, int laser_num);

void hal_LaserGpioPinStateRead(uint8_t lasernum);

#endif